import request from '@/framework/utils/request'

// 获取账户列表
export function getAdminAccountList(data) {
  return request({
    url: '/admin/AccountController/getAdminAccountList',
    method: 'post',
    data
  })
}

// 编辑
export function getAccountInfo(data) {
  return request({
    url: '/admin/AccountController/getAccountInfo',
    method: 'post',
    data
  })
}

// 保存
export function saveAdminInfo(data) {
  return request({
    url: '/admin/AccountController/saveAdminInfo',
    method: 'post',
    data
  })
}

// 禁用
export function changeAccountVaild(data) {
  return request({
    url: '/admin/AccountController/changeAccountVaild',
    method: 'post',
    data
  })
}

// 导出
export function getAdminAccountExport(data) {
  return request({
    url: '/admin/AccountController/getAdminAccountExport',
    method: 'post',
    data
  })
}

// 获取所有角色
export function getRoles(data) {
  return request({
    url: '/PDDLController/getRoles',
    method: 'post',
    data
  })
}

// 获取所有角色
export function setBatchRole(data) {
  return request({
    url: '/admin/AuthController/setBatchRole',
    method: 'post',
    data
  })
}


export function upload(data) {
  return request({
    url: '/admin/UploadController/upload_img/fimg',
    method: 'post',
    data
  })
}

